<!-- <!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>homework8</title>
    </head>
    <body>
        <button id="bt">随机点名</button>
        <script>
            document.getElementById("bt").onclick = function(){
                var name = ['kiku','Lili','哈哈','haha','嘻嘻']
                var m = name.length 
               var i = Math.floor(Math.random()*m)
                alert("你好-"+name[i])
            }
        </script>
    </body>
</html> -->

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>homework8</title>
    </head>
    <body>
        <script>
            function mytime(){
                var time = new Date();
            var year = time.getFullYear()
            var month =time.getMonth()+1
            var day = time.getDate()
            var hour = time.getHours()
            var minute = time.getMinutes()
            var second = time.getSeconds()
            document.write('<ul>'+'<li>'+year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second+'</li>'+'</ul>')
           
            }
            setInterval(mytime,1000) 
        </script>
    </body>
</html>